3.2844 \(\int \frac{2+x}{1+(2+x)^2} \, dx\)

Optimal. Leaf size=12 \[ \frac{1}{2} \log \left ((x+2)^2+1\right ) \]

[Out]

Log[1 + (2 + x)^2]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0057401, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {372, 260} \[ \frac{1}{2} \log \left ((x+2)^2+1\right ) \]

Antiderivative was successfully verified.

[In]

Int[(2 + x)/(1 + (2 + x)^2),x]

[Out]

Log[1 + (2 + x)^2]/2

Rule 372

Int[(u_)^(m_.)*((a_) + (b_.)*(v_)^(n_))^(p_.), x_Symbol] :> Dist[u^m/(Coefficient[v, x, 1]*v^m), Subst[Int[x^m
*(a + b*x^n)^p, x], x, v], x] /; FreeQ[{a, b, m, n, p}, x] && LinearPairQ[u, v, x]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{2+x}{1+(2+x)^2} \, dx &=\operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,2+x\right )\\ &=\frac{1}{2} \log \left (1+(2+x)^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0028449, size = 12, normalized size = 1. \[ \frac{1}{2} \log \left ((x+2)^2+1\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(2 + x)/(1 + (2 + x)^2),x]

[Out]

Log[1 + (2 + x)^2]/2

________________________________________________________________________________________

Maple [A]  time = 0., size = 12, normalized size = 1. \begin{align*}{\frac{\ln \left ({x}^{2}+4\,x+5 \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2+x)/(1+(2+x)^2),x)

[Out]

1/2*ln(x^2+4*x+5)

________________________________________________________________________________________

Maxima [A]  time = 1.05449, size = 14, normalized size = 1.17 \begin{align*} \frac{1}{2} \, \log \left ({\left (x + 2\right )}^{2} + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)/(1+(2+x)^2),x, algorithm="maxima")

[Out]

1/2*log((x + 2)^2 + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.42029, size = 32, normalized size = 2.67 \begin{align*} \frac{1}{2} \, \log \left (x^{2} + 4 \, x + 5\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)/(1+(2+x)^2),x, algorithm="fricas")

[Out]

1/2*log(x^2 + 4*x + 5)

________________________________________________________________________________________

Sympy [A]  time = 0.082141, size = 10, normalized size = 0.83 \begin{align*} \frac{\log{\left (x^{2} + 4 x + 5 \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)/(1+(2+x)**2),x)

[Out]

log(x**2 + 4*x + 5)/2

________________________________________________________________________________________

Giac [A]  time = 1.09248, size = 15, normalized size = 1.25 \begin{align*} \frac{1}{2} \, \log \left (x^{2} + 4 \, x + 5\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)/(1+(2+x)^2),x, algorithm="giac")

[Out]

1/2*log(x^2 + 4*x + 5)